import request from '@/utils/request'

// 查询员工待办列表
export function listWork(query) {
  return request({
    url: '/mahjong/work/list',
    method: 'get',
    params: query
  })
}
// 根据角色code获取人员列表
export function listUser(query) {
  return request({
    url: '/mahjong/work/listByRoleCode/'+query,
    method: 'get'
  })
}
// 查询员工待办详细
export function getWork(id) {
  return request({
    url: '/mahjong/work/' + id,
    method: 'get'
  })
}

// 新增员工待办
export function addWork(data) {
  return request({
    url: '/mahjong/work',
    method: 'post',
    data: data
  })
}

// 修改员工待办
export function updateWork(data) {
  return request({
    url: '/mahjong/work',
    method: 'put',
    data: data
  })
}

// 删除员工待办
export function delWork(id) {
  return request({
    url: '/mahjong/work/' + id,
    method: 'delete'
  })
}

// 导出员工待办
export function exportWork(query) {
  return request({
    url: '/mahjong/work/export',
    method: 'get',
    params: query
  })
}
